<%--
  Created by IntelliJ IDEA.
  User: 29960
  Date: 2022/8/23
  Time: 13:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--<!DOCTYPE html>--%>
<%String path=request.getContextPath();%>
<html>
<head>
  <meta charset="UTF-8">
  <title>员工列表</title>
  <link type="text/css" rel="stylesheet" href="<%=path%>/admin/car/fontsawesome/css/font-awesome.css"/>
  <link type="text/css" rel="stylesheet" href="<%=path%>/admin/car/css/style.css"/>
</head>
<body>
<div class="main_box">
  <h2><span></span>员工列表</h2>
  <div class="cont_box">
    <form action="#" method="post" id="staff_form">
      <div class="search_formbox clearfix">
        <a href="${pageContext.request.contextPath}/admin/findAll"><button type="button" id="job" class="btn blue_btn curr">全部员工</button></a>
        <a href="${pageContext.request.contextPath}/admin/findZz"><button type="button" id="quit" class="btn blue_btn">在职员工</button></a>
        <a href="${pageContext.request.contextPath}/admin/findLz"><button type="button" id="all" class="btn blue_btn">离职员工</button></a>
      </div>
      <table border="0" cellspacing="0" cellpadding="0" class="table" id="table_box">
        <thead>
        <tr>
          <th>员工编号</th>
          <th>姓名</th>
          <th>性别</th>
          <th>岗位</th>
          <th>电话</th>
          <th>录入时间</th>
          <th>状态</th>
          <th width="268">操作</th>
        </tr>
        </thead>
        <c:forEach items="${list}" var="list">
          <tbody>
          <tr id="1"><!--此处id为进行编辑或查看时该条数据的唯一标识-->
            <td>${list.b_employee}</td>
            <td>${list.z_name}</td>
            <td>${list.z_sex}</td>
            <td>${list.z_job_no}</td>
            <td>${list.z_phone}</td>
            <td>${list.z_date}</td>
            <td>${list.z_state}</td>
            <td>
              <a href="${pageContext.request.contextPath}/admin/findById?eid=${list.b_employee}" >
                <i class="fa fa-edit"></i>
                <span>编辑</span>
              </a>
              <a href="${pageContext.request.contextPath}/admin/findByYj?eid=${list.b_employee}">
                <i class="fa fa-eye"></i>
                <span>查看业绩</span>
              </a>
            </td>
          </tr>
            <%--                <tr id="2">--%>
            <%--                    <td>10000002</td>--%>
            <%--                    <td>赵四</td>--%>
            <%--                    <td>女</td>--%>
            <%--                    <td>财务</td>--%>
            <%--                    <td>13666666666</td>--%>
            <%--                    <td>2017-03-06</td>--%>
            <%--                    <td>离职</td>--%>
            <%--                    <td>--%>
            <%--                        <a href="update_Staff.html" class="table_btn table_edit edit_btn">--%>
            <%--                            <i class="fa fa-edit"></i>--%>
            <%--                            <span>编辑</span>--%>
            <%--                        </a>--%>
            <%--                        <a href="javascript:void(0);" class="table_btn table_info see_btn">--%>
            <%--                            <i class="fa fa-eye"></i>--%>
            <%--                            <span>查看业绩</span>--%>
            <%--                        </a>--%>
            <%--                    </td>--%>
            <%--                </tr>--%>
          </tbody>
        </c:forEach>
      </table>
    </form>
  </div>
</div>
<!--javascript include-->
<script src="<%=path%>/admin/car/js/jquery-2.2.1.min.js"></script>
<script src="<%=path%>/admin/car/js/jquery.dataTables.min.js"></script>
<script src="<%=path%>/admin/car/js/bootstrap-datepicker.js"></script>
<script src="<%=path%>/admin/car/js/jquery.validate.min.js"></script>
<script src="<%=path%>/admin/car/js/bootstrap-datepicker.js"></script>
<script src="<%=path%>/admin/car/js/other.js"></script>
<script>
  $(function(){
    $("body").other({tableId:"#table_box",tableWrap:[1,7],tableAas:[ 0,"desc"],tableSearch:true});
    $("body").tipWindow({method:"edit",type:"form",Class:".edit_btn",even:"click",tipTit:"编辑员工信息",Twidth:"700",Theight:"460",editUrl:"edit_Staff.html"});//editUrl 编辑员工信息请求地址
    $("body").tipWindow({method:"edit",type:"form",Class:".see_btn",even:"click",tipTit:"员工业绩",Twidth:"998",Theight:"600",editUrl:"staff_Achievement.html"});//editUrl 员工业绩请求地址
    //员工筛选
    $(".search_formbox .btn").click(function(){
      var dataId = $(this).prop("id"),//员工状态id
              that = $(this);
      $.ajax({
        type:"post",
        url:"#",
        data:{"id":dataId},
        success:function(data){
          that.addClass("curr").siblings().removeClass("curr");
        }
      });
    });
  });
</script>
</body>
</html>